home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12056 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: nntp.snfc21.pbi.net!usenet
  2. From: mich@pbinet.com
  3. Newsgroups: comp.unix.programmer,comp.lang.c
  4. Subject: Re: Q: Size of a program
  5. Date: 28 Mar 1996 23:34:33 GMT
  6. Organization: Pacific Bell Internet Services
  7. Message-ID: <4jf7m9$5vm@nntp.snfc21.pbi.net>
  8. References: <315821A7.3C8E@lava.weeg.uiowa.edu>
  9. Reply-To: mich@pbinet.com
  10. NNTP-Posting-Host: ppp-5-34.rdcy01.pbinet.com
  11. X-Newsreader: IBM NewsReader/2 v1.03
  12.  
  13. In <315821A7.3C8E@lava.weeg.uiowa.edu>, Artur Wojdat <awojdat@lava.weeg.uiowa.edu> writes:
  14. >Hello everybody,
  15. >    I have bunch of programs designed to query Sybase and print the 
  16. >results. Nothing special about that but the source code for most of them 
  17. >takes up about 2K of disk space and compiled version ... over 600K !!!
  18. >    We have some limitations on our system and I am not able to have 
  19. >all my programs compiled. So, is there a way to make the executables 
  20. >shrink in size ?? Any suggestions will be greatly appreciated
  21.  
  22. Sure. Make as many of them as possible shared objects, or alternately, create a 'master'
  23. interface program and menu out the sub programs as choices to the user, exec()
  24. or spawn() out new processes to the sub-progs. What I would do Is a combo of
  25. the two methods, createing one or two or three shared libraries and putting all the
  26. 'lower level' subroutines (user input, data display, housekeeping, db queries,
  27. various and sundry routines) in the libs and dividing up the higher level stuff
  28. among my executable objects.
  29. Frankly, I can't think of why anyone wouldn't do it that way. Maybe I'm
  30. a traditionalist.
  31. -----------------------------
  32. Reality Meter: [\.....], thought so
  33. -----------------------------
  34.  
  35.